package com.smart.model.convert;

import com.smart.model.dtomapper.SuperviseUserDtoMapper;
import com.smart.model.domain.SuperviseUserDO;
import com.smart.model.vo.SuperviseUserVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class SuperviseUserConvert {

    public static List<SuperviseUserVO> buildSuperviseUserVoList(List<SuperviseUserDO> superviseUserDOList) {
        if (CollectionUtils.isEmpty(superviseUserDOList)) {
            return Lists.newArrayList();
        }
        List<SuperviseUserVO> superviseUserVOList = new ArrayList<>();
        for (SuperviseUserDO superviseUserDO : superviseUserDOList) {
            superviseUserVOList.add(SuperviseUserDtoMapper.INSTANCE.do2VO(superviseUserDO));
        }

        return superviseUserVOList;
    }
}
